export function readFile(file) {
    return new Promise((resolve) => {
        let reader = new FileReader();
        reader.readAsArrayBuffer(file);
        reader.onload = (event) => {
            resolve(event.target.result);
        };
    });
}

export let Chracter = {
    date: {
        text: "时间",
        type: "string",
    },
    name: {
        text: "姓名",
        type: "string",
    },
    id: {
        text: "工号",
        type: "string",
    },
    times: {
        text: "打卡次数(次)",
        type: "number",
    },
    duration: {
        text: "实际工作时长(小时)",
        type: "number",
    },
    askforLeave: {
        text: "假勤申请",
        type: "string",
    },
    status: {
        text: "校准状态",
        type: "string",
    },
    lackOfCards: {
        text: "缺卡次数(次)",
        type: "number",
    },
    additionCards: {
        text: "补卡次数(次)",
        type: "number",
    },
    fieldWork: {
        text: "外勤次数(次)",
        type: "number",
    },
    go_out: {
        text: "外出(小时)",
        type: "number",
    },
    onBusiness: {
        text: "出差(天)",
        type: "number",
    },
    leaveAnnual: {
        text: "年假(天)",
        type: "number",
    },
    leaveSick: {
        text: "病假(小时)",
        type: "number",
    },
    leavePersonal: {
        text: "事假(小时)",
        type: "number",
    },
    leaveInLieu: {
        text: "调休假(小时)",
        type: "number",
    },
    leaveMarriage: {
        text: "婚假(天)",
        type: "number",
    },
    leaveMaternity: {
        text: "产假(天)",
        type: "number",
    },
    leavePaternity: {
        text: "陪产假(天)",
        type: "number",
    },
    clockInTime: {
        text: "上班打卡时间",
        type: "string",
    },
    clockOutTime: {
        text: "下班打卡时间",
        type: "string",
    },
};

export let EmployeeTable = new Map([
    ["覃正才", "SH-01-001"],
    ["陈金海", "SH-01-002"],
    ["郭青柳", "SH-02-003"],
    ["左韩玉", "SH-02-004"],
    ["高蓉", "SH-01-005"],
    ["王许鹏", "SH-01-006"],
    ["李洋", "SH-01-007"],
    ["宋琼", "SH-01-008"],
    ["王达现", "SH-01-010"],
    ["谢玲", "SH-02-009"],
])